<?php
/**
* @package YARBB
* @copyright Авторские права (C) 2009 www.yar-it.com. Все права защищены.
* @license Лицензия http://www.gnu.org/licenses/gpl-2.0.htm GNU/GPL, или help/license.php
* YARBB! - свободное программное обеспечение распространяемое по условиям лицензии GNU/GPL
* Для получения информации о используемых расширениях и замечаний об авторском праве, смотрите файл copyright.php.
*/

	defined('_JEXEC') or die('Restricted access');
	global $ybbConfig;
	$dispclr = $this->theme;

?>
<script language="javascript" type="text/javascript">

var _YBB_JS_EDITOR_PATH = "<?php echo JURI::root(); ?>components/com_yarbb/assets/ybbeditor";

<?php if( $this->editmode > 0) { ?>
	function submitbutton(pressbutton) {
	    if (pressbutton == 'cancelProfile') {
	        submitform( pressbutton );
	        return;
	    }
	    submitform( pressbutton );
	}

	function uploadAvatar()
	{
		var form = document.adminForm;
		form.task.value="uploadAvatar";
		form.submit();

	}
<?php } ?>

</script>
<?php echo '<script src="components/com_yarbb/assets/ybbeditor/ed.js" language="javascript" type="text/javascript"></script>'; ?>

<form action="<?php echo $this->action; ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
  <div class="ybbmaindiv">
    <table class="ybbnormaltable" cellpadding="0" cellspacing="0">
      <tr>
        <td class="ybbtopleft"></td>
        <td class="ybbtopmiddle">&nbsp;<?php echo $ybbConfig->boardname;?> </td>
        <td class="ybbtopright"></td>
      </tr>
      <tr>
        <td class="ybbleftbody"></td>
        <td class="ybbheaderrow"><table class="ybbnormaltable" cellpadding="5" cellspacing="5">
            <tr>
              <td><div id="yarbb_menu">
                <ul id="ybbmenu">
                  <?php echo $this->userprofile['home']; ?>
                  <li class="node"><a>Инструменты</a>
                    <ul>
                      <?php echo $this->userprofile['latest']; ?> 
					  <?php echo $this->userprofile['link']; ?> 
					  <?php echo $this->userprofile['mylist']; ?> 
					  <?php echo $this->userprofile['approval']; ?>
                    </ul>
                  </li>
                </ul>
              </div></td>
              <td class="ybbheaderusername"><?php echo JText::_('WELCOME') . ' ' . $this->userprofile['boardusername']; ?></td>
              <td class="ybbheaderavatar"><?php echo $this->userprofile['thumb']; ?></td>
            </tr>
          </table></td>
        <td class="ybbrightbody"></td>
      </tr>
      <tr class="ybbtablefooter">
        <td class="ybbbotleft"></td>
        <td class="ybbbotmiddle"></td>
        <td class="ybbbotright"></td>
      </tr>
      <tr>
        <td colspan="3" class="ybbcolspacer"></td>
      </tr>
      <tr>
        <td class="ybbtopleft"></td>
        <td class="ybbtopmiddle">&nbsp;<?php echo $this->labels['pagetitle']; ?> </td>
        <td class="ybbtopright"></td>
      </tr>
      <tr>
        <td class="ybbleftbody"></td>
        <td><table class="ybbnormaltable" cellpadding="0" cellspacing="0">
            <?php if( $ybbConfig->showrealname > 0) { ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['name']; ?>:</td>
              <td class="ybbproval"><b><?php echo $this->item['name']; ?></b></td>
            </tr>
            <?php } ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['username']; ?>:</td>
              <td class="ybbproval"><b><?php echo $this->item['username']; ?></b></td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['group']; ?>:</td>
              <td class="ybbproval"><b><?php echo $this->item['usertype']; ?></b></td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['dob']; ?>:</td>
              <td class="ybbproval"><?php if($this->editmode > 0) { ?>
                <input class="text_area" type="text" name="dob" id="dob" size="20" maxlength="20" value="<?php echo JHTML::_('date', $this->item['dob'], $ybbConfig->dateformat); ?>" />
                <?php } else { echo JHTML::_('date', $this->item['dob'], $ybbConfig->dateformat); } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['gender']; ?>:</td>
              <td class="ybbproval"><?php if($this->editmode > 0) {
				            		echo $this->gendercombo;
				            	} else {
				            		echo $this->item['gender'];
				            	}
				           	?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['avatar']; ?>:</td>
              <td class="ybbproval"><?php echo $this->avatarcombo; ?></td>
            </tr>
            <?php if( $ybbConfig->avatarupload > 0 && $this->editmode > 0) { ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['upload']; ?>:</td>
              <td class="ybbproval"><div class="ybbuploadbut">
                  <input size="37" type="file" id="file-upload" name="Filedata" />
                </div>
                <div class="ybbuploadbut"> <a class="ovalbutton" href="#" onclick="uploadAvatar(); return false;"> <span><?php echo  JText::_('BUTTON_UPLOAD'); ?></span> </a> </div></td>
            </tr>
            <?php } ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['postcount']; ?>:</td>
              <td class="ybbproval"><?php echo $this->item['post_count']; ?></td>
            </tr>
            <?php if( $ybbConfig->showrank > 0) { ?>
            <tr>
              <td class="ybbprolabel" valign="top"><?php echo $this->labels['rank_title']; ?>:</td>
              <td class="ybbproval"><?php echo $this->item['rank_title']; ?><br/>
                <img src="<?php echo YARBB_ASSETS_URL . '/ranks/' . $this->item['rank_image']; ?>" /></td>
            </tr>
            <?php } ?>
            <?php if( $ybbConfig->showkarma > 0) { ?>
            <tr>
              <td class="ybbprolabel" valign="top"><?php echo $this->labels['karma']; ?>:</td>
              <td class="ybbproval"><?php echo $this->item['karma']; ?></td>
            </tr>
            <?php } ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['location']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="location" id="location" size="45" maxlength="45" value="<?php echo $this->item['location']; ?>"/>
                <?php } else { echo $this->item['location']; } ?>
              </td>
            </tr>
            <?php if( $this->editmode > 0) { ?>
            <tr>
              <td class="ybbprolabel" valign="top"><?php echo $this->labels['signature']; ?></td>
              <td class="ybbproval"><div class="ybbusereditor"> <?php echo '<script> edToolbar("signature", 1); </script>'; ?>
                  <textarea id="signature" class="text_area" name="signature" rows="5" cols="50"><?php echo $this->item['signature']; ?></textarea>
                </div></td>
            </tr>
            <?php } ?>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['www']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="www" id="www" size="45" maxlength="45" value="<?php echo $this->item['www']; ?>" />
                <?php } else { echo $this->item['www']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['icq']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="icq" id="icq" size="45" maxlength="45" value="<?php echo $this->item['icq']; ?>" />
                <?php } else { echo $this->item['icq']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['aol']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="aol" id="aol" size="45" maxlength="45" value="<?php echo $this->item['aol']; ?>" />
                <?php } else { echo $this->item['aol']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['msn']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="msn" id="msn" size="45" maxlength="45" value="<?php echo $this->item['msn']; ?>" />
                <?php } else { echo $this->item['msn']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['yahoo']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="yahoo" id="yahoo" size="45" maxlength="45" value="<?php echo $this->item['yahoo']; ?>" />
                <?php } else { echo $this->item['yahoo']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['jabber']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="jabber" id="jabber" size="45" maxlength="45" value="<?php echo $this->item['jabber']; ?>" />
                <?php } else { echo $this->item['jabber']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['skype']; ?>:</td>
              <td class="ybbproval"><?php if( $this->editmode > 0) { ?>
                <input class="text_area" type="text" name="skype" id="skype" size="45" maxlength="45" value="<?php echo $this->item['skype']; ?>" />
                <?php } else { echo $this->item['skype']; } ?>
              </td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['view']; ?>:</td>
              <td class="ybbproval"><?php echo $this->item['hits']; ?></td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['registereddate']; ?></td>
              <td class="ybbproval"><?php echo JHTML::_('date',$this->item['registerdate'], $ybbConfig->dateformat ); ?></td>
            </tr>
            <tr>
              <td class="ybbprolabel"><?php echo $this->labels['lastvisitdate']; ?></td>
              <td class="ybbproval"><?php echo JHTML::_('date',$this->item['lastvisitdate'], $ybbConfig->dateformat ); ?></td>
            </tr>
            <?php if( $this->editmode > 0) { ?>
            <tr>
              <td class="ybbprolabel"></td>
              <td><div class="buttonarea"> <a rel="nofollow" class="ovalbutton" href="#" onclick="submitbutton('saveProfile'); return false;"> <span><?php echo $this->labels['save']; ?></span> </a> <a rel="nofollow" class="ovalbutton" href="#" onclick="submitbutton('cancelProfile'); return false;"> <span><?php echo $this->labels['cancel']; ?></span> </a> </div></td>
            </tr>
            <?php } ?>
          </table></td>
        <td class="ybbrightbody"></td>
      </tr>
      <tr class="ybbtablefooter">
        <td class="ybbbotleft"></td>
        <td class="ybbbotmiddle"></td>
        <td class="ybbbotright"></td>
      </tr>
    </table>
  </div>
  <input type="hidden" name="option" id="option" value="com_yarbb" />
  <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->item['user_id']; ?>" />
  <input type="hidden" name="<?php echo JUtility::getToken(); ?>" value="1" />
  <input type="hidden" name="task" id="task" value="" />
</form>
<?php echo YARBB_COPYRIGHT; ?> <br clear="left" />
